package com.jeesite.common.mybatis.mapper.provider;

public class MySelectSqlProvider extends SelectSqlProvider {

  /*public String getByEntity(BaseEntity<?> entity) {
    String lvRet=super.getByEntity(entity);
    QueryWhere lvWhere=entity.getSqlMap().getWhere();
    Map.Entry<String,QueryWhereEntity> lvIdEntity=null;
    for (Map.Entry<String,QueryWhereEntity> item:lvWhere.entrySet()){
      if (item.getValue().getColumnName().equals("id")){
          lvIdEntity=item;
          break;
      }
    }
    if (lvIdEntity==null) return lvRet;
    if (lvIdEntity!=null){
      System.out.println(lvIdEntity.getValue().toString());
      String lvsIdPattern="a.id %1$s #{sqlMap.where.%2$s.val}";
      String lvsIdWhere=lvIdEntity.getValue().getVal()==null? "a.id is null":
      String.format(lvsIdPattern,
              lvIdEntity.getKey().startsWith("id#EQ")?"=":
                      (lvIdEntity.getKey().startsWith("id#NE")?"<>":""),
              lvIdEntity.getKey());
      //if (lvIdEntity.getKey())
      lvRet=lvRet.replace(" WHERE a."," WHERE "+lvsIdWhere+" and a.");
      //System.out.println(lvIdEntity.getVal());
     // System.out.println(lvIdEntity.getValue());
    }
    return lvRet;
  }*/
}
